Skip to content

Instantly share code, notes, and snippets.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active May 22, 2026 23:17
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active May 22, 2026 23:14
Conventional Commits Cheatsheet
@Brajesh2022
Brajesh2022 / Running Antigravity CLI on Termux.md
Last active May 22, 2026 23:14
Working setup for running Antigravity CLI (agy) natively on Android Termux without proot-distro, VMs, or Cloud Shell. Fixes 7 compatibility issues: TCMalloc 39-bit VA, faccessat2 syscall, glibc libc.so shim, LD_PRELOAD pollution, DNS resolver, TLS certificates, and shell hash caching. Includes a reusable pattern-based binary patch script (patch_…

This document describes the working setup for running the native Antigravity CLI (agy) on Android Termux.

The main goal is to run the official Linux ARM64 Antigravity binary directly from Termux without Cloud Shell, without a full VM, and without replacing Android. The setup uses a small binary patch plus a wrapper that adapts the Linux/glibc binary to Termux's Android environment.

The method is designed to be repeatable for future Antigravity releases. The patch script scans instruction patterns instead of relying on fixed offsets. If Antigravity changes its allocator code generation in the future, the script will print warning counts instead of silently claiming success.

What This Fixes

Antigravity's Linux ARM64 binary can fail on Termux for multiple independent reasons.

@xthezealot
xthezealot / lyra.txt
Last active May 22, 2026 23:13
Lyra - AI Prompt Optimization Specialist
You are Lyra, a master-level AI prompt optimization specialist. Your mission: transform any user input into
precision-crafted prompts that unlock AI's full potential across all platforms.
## THE 4-D METHODOLOGY
### 1. DECONSTRUCT
- Extract core intent, key entities, and context
- Identify output requirements and constraints
- Map what's provided vs. what's missing
@ubeydeozdmr
ubeydeozdmr / turkiye-api-tr.md
Last active May 22, 2026 23:10
Türkiye API (il, ilçe, mahalle, köy verileri)
@rxaviers
rxaviers / gist:7360908
Last active May 22, 2026 23:08
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@chrisswanda
chrisswanda / smtp_icloud.py
Last active May 22, 2026 23:05
Python script to send mail via Apple's iCloud. Be sure to setup an app specific password for and do not use or expose your iCloud password. https://support.apple.com/en-us/HT204397
import smtplib
#email.mime.multipart is specific to python3
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
msg = MIMEMultipart()
msg['From'] = 'sendfrom@mail.com'
msg['To'] = 'sendto@mail.com'
msg['Subject'] = 'Subject'
@kanmadigital
kanmadigital / llm-wiki.md
Created May 16, 2026 15:16 — forked from rohitg00/llm-wiki.md
LLM Wiki v2 — extending Karpathy's LLM Wiki pattern with lessons from building agentmemory

LLM Wiki v2

A pattern for building personal knowledge bases using LLMs. Extended with lessons from building agentmemory 10K Stars ⭐️, a persistent memory engine for AI coding agents.

This builds on Andrej Karpathy's original LLM Wiki idea file. Everything in the original still applies. This document adds what we learned running the pattern in production: what breaks at scale, what's missing, and what separates a wiki that stays useful from one that rots.

Currently, Working on AKBP: Agent Knowledge Base Protocol based on my findings, a protocol for creating, updating, retrieving, and sharing durable knowledge across AI agents.

What the original gets right